#include <iostream>
#include <mysql/mysql.h>
#include <string.h>
#include "connect.cpp"

//delete
int main(){
    MYSQL conn;
    conn = my_connect();

    std::string sql = "delete from user where id=3";
    int res = mysql_query(&conn, (char*)sql.c_str());
    if(res){
        printf("delete failed (%s)\n", mysql_error(&conn));
    }else{
        std::cout << "delete success" << std::endl;
    }

    mysql_close(&conn);
    return 0;
}